<div class="admin_left actions">
    <h3 style="font-size:20px;">Manage more</h3>
	<ul>
		<li style="list-style-type:none; margin-bottom:20%;"><?php echo $this->Html->link(__('Edit Customer'), array('action' => 'edit', $customer['Customer']['id'])); ?> </li>
		<li style="list-style-type:none; margin-bottom:20%;"><?php echo $this->Form->postLink(__('Delete Customer'), array('action' => 'delete', $customer['Customer']['id']), null, __('Are you sure you want to delete # %s?', $customer['Customer']['id'])); ?> </li>
		<li style="list-style-type:none; margin-bottom:20%;"><?php echo $this->Html->link(__('List Customers'), array('action' => 'index')); ?> </li>
		<li style="list-style-type:none; margin-bottom:20%;"><?php echo $this->Html->link(__('New Customer'), array('action' => 'add')); ?> </li>
		<li style="list-style-type:none; margin-bottom:20%;"><?php echo $this->Html->link(__('List Genders'), array('controller' => 'genders', 'action' => 'index')); ?> </li>
		<li style="list-style-type:none; margin-bottom:20%;"><?php echo $this->Html->link(__('New Gender'), array('controller' => 'genders', 'action' => 'add')); ?> </li>
		<li style="list-style-type:none; margin-bottom:20%;"><?php echo $this->Html->link(__('List Groups'), array('controller' => 'groups', 'action' => 'index')); ?> </li>
		<li style="list-style-type:none; margin-bottom:20%;"><?php echo $this->Html->link(__('New Group'), array('controller' => 'groups', 'action' => 'add')); ?> </li>
        <li style="list-style-type:none; margin-bottom:20%;"><?php echo $this->Html->link(__('Reset Password'), array('action' => 'resetPassword', $customer['Customer']['id'])); ?></li>
	</ul>
</div>

    <!-- todo list:
    -   customer id 2 shouldn't be able to see customer id 3 profile
        by typing /customers/view/3. Currently it doesn't display but
        there are no error messages either-->

    <!-- if view/x in url where x does not match current user then don't allow view -->



<?php if ($current_customer['id'] == $customer['Customer']['id'] || $current_customer['group_id'] == '1'): ?>
    <div style="margin-left:10%;"  class=" admin_right customers view">
        <!-- extra by An: Search bar
        <?php if ($current_customer['group_id'] == '1'): ?>
        
            <div id="search" style="height:150px; text-align: right; margin-right:10%;">
                <?php
                    echo $this->Form->create('Customer',array('action' => 'search'));
                    echo $this->Form->input('keyword', array('label' => 'Search for'));
                    echo $this->Form->end('Search');
                ?>
            </div>
        <?php endif; ?>
        <!-- end of extra -->



        <?php if ($current_customer['group_id'] == '2'): ?>
        
            <div id="search" style="height:150px; text-align: right; margin-right:10%;">
            </div>
        <?php endif; ?>

        
        <h2 style="position:relative; top:-50px;"><?php echo $current_customer['username']; ?><?php  echo __('&#39;s Profile'); ?></h2>

        <table style="width:40%;  margin-bottom:8%;" class="table">
            <tr>
             <th id="pinkHeader" style="font-size:180%;"><?php echo __('Personal Detail'); ?></th>
            </tr>

            <tr>
                <th><?php echo __('Id'); ?></th>
                 <td>
                    <?php echo h($customer['Customer']['id']); ?>
                    &nbsp;
                 </td>
            </tr>

            <tr>
                <th><?php echo __('First Name'); ?></th>
                <td>
                    <?php echo h($customer['Customer']['first_name']); ?>
                    &nbsp;
                </td>
            </tr>

            <tr>
                <th><?php echo __('Last Name'); ?></th>
                <td>
                    <?php echo h($customer['Customer']['last_name']); ?>
                    &nbsp;
                </td>
            </tr>

            <tr>
                <th><?php echo __('Dob'); ?></th>
                <td>
                    <?php echo h($customer['Customer']['dob']); ?>
                    &nbsp;
                </td>
            </tr>

            <tr>
                <th><?php echo __('Gender'); ?></th>
                <td>
                    <?php echo h($customer['Gender']['name']); ?>
                    &nbsp;
                </td>
            </tr>
        </table>

        <table style="width:40%;  margin-bottom:8%;" class="table">
            <tr>
             <th style="font-size:180%;"><?php echo __('Address Detail'); ?></th>
            </tr>

            <tr>
                <th><?php echo __('Street'); ?></th>
                <td>
                    <?php echo h($customer['Customer']['street']); ?>
                    &nbsp;
                </td>
            </tr>

            <tr>
                <th><?php echo __('Suburb'); ?></th>
                <td>
                    <?php echo h($customer['Customer']['suburb']); ?>
                    &nbsp;
                </td>
            </tr>

            <tr>
                <th><?php echo __('City'); ?></th>
                <td>
                    <?php echo h($customer['Customer']['city']); ?>
                    &nbsp;
                </td>
            </tr>

            <tr>
                <th><?php echo __('State'); ?></th>
                <td>
                    <?php echo h($customer['Customer']['state']); ?>
                    &nbsp;
                </td>
            </tr>


            <tr>
                <th><?php echo __('Postcode'); ?></th>
                <td>
                    <?php echo h($customer['Customer']['postcode']); ?>
                    &nbsp;
                </td>
            </tr>


            <tr>
                <th><?php echo __('Country'); ?></th>
                <td>
                    <?php echo h($customer['Customer']['country']); ?>
                    &nbsp;
                </td>
            </tr>
        </table>


        <table style="width:40%;" class="table">

            <tr>
             <th style="font-size:180%;"><?php echo __('Account Detail'); ?></th>
            </tr>

            <tr>
                <th><?php echo __('Phone'); ?></th>
                <td>
                    <?php echo h($customer['Customer']['phone']); ?>
                    &nbsp;
                </td>
            </tr>

            <tr>
                <th><?php echo __('Join Date'); ?></th>
                <td>
                    <?php echo h($customer['Customer']['join_date']); ?>
                    &nbsp;
                </td>
            </tr>

            <tr>
                <th><?php echo __('Username'); ?></th>
                <td>
                    <?php echo h($customer['Customer']['username']); ?>
                    &nbsp;
                </td>
            </tr>


            <tr>
                <th><?php echo __('Email'); ?></th>
                <td>
                    <?php echo h($customer['Customer']['email']); ?>
                    &nbsp;
                </td>
            </tr>


            <tr>
                <th><?php echo __('Last Login'); ?></th>
                <td>
                    <?php echo h($customer['Customer']['last_login']); ?>
                    &nbsp;
                </td>
            </tr>


            <tr>
                <th><?php echo __('Group'); ?></th>
                <td>
                    <?php echo h($customer['Group']['name']); ?>
                    &nbsp;
                </td>
            </tr>

            <tr>

                <!--
                        <dt><?php echo __('Password'); ?></dt>
                <td>
                    <?php echo h($customer['Customer']['password']); ?>
                    &nbsp;
                </td>
                        -->
            </tr>
        </table>
    </div>

<?php endif; ?>
